package com.huaxin.device.models;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 报警消息模板可用参数元数据
 */
@Data
public class AlarmMessageParam {

    @Schema(description = "参数名（模板中使用的占位符）", example = "deviceName")
    private String param;

    @Schema(description = "中文名称", example = "设备名称")
    private String label;

    @Schema(description = "示例值", example = "CB-001")
    private String example;

    @Schema(description = "数据来源", example = "设备信息")
    private String source;

    // 构造方法（可选）
    public static AlarmMessageParam of(String param, String label, String example, String source) {
        AlarmMessageParam p = new AlarmMessageParam();
        p.setParam(param);
        p.setLabel(label);
        p.setExample(example);
        p.setSource(source);
        return p;
    }
}
